<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix='fmt'%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<form id="pagerForm" method="post" action="app/contacts.do?action=pageContactsIndex">
	<input type="hidden" name="pageNum" value="${pagingBean ne null ? pagingBean.currentPage : 1}" />
	<input type="hidden" name="numPerPage" value="${pagingBean ne null ? pagingBean.pageSize : 20}" />
</form>

<!-- SearchBar -->
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="app/contacts.do?action=pageContactsIndex" 
		method="post" id="searchForm" rel="pagerForm">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						<label>姓名：</label>
						<input type="text" name="fullName" rel="pagerForm" value="${fullName ne null ? fullName : ''}" />
					</td>
					<td>
						<label>部门：</label>
						<select name="departmentId" class="combox">
							<option value="">所有</option>
							<logic:present name="department">
								<logic:iterate name="department" id="dict">
									<option value="${dict.id}" ${departmentId ne null && departmentId eq dict.id ? 'selected' : ''}>${dict.dictKey}</option>
								</logic:iterate>
							</logic:present>
						</select>
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</div>

<!-- Body -->	
<div class="pageContent">
	<%@ include file="datagrid/dataGridContacts.jsp" %>
</div>
